<?php

namespace app\admin\controller;

use think\Db;

class Project extends BaseController
{
    //http://localhost/tjsgkj/public/index.php/admin/Project/index
    public function index()
    {
        return view();
    }

    public function add()
    {
        $data = request()->param();
        //$data = ['title' => 'title', 'textbox' => 'textbox'];
        Db::table('sg_project')->insert($data);
        //return view();
    }

    public function lists()
    {
        $list = Db::table('sg_project')->select();
        $this->assign('list', $list);
        return view();
    }

    public function get()
    {
        $data = request()->param();
        $id = $data["id"];
        $pro = Db::table('sg_project')->where("id",$id)->find();
        $this->assign('pro', $pro);
        return view();
    }

}
